/**
 * Copyright(c) 2015 Jade Techonologies Co., Ltd.
 *
 * History:
 *   15-1-17 下午3:07 Created by lyyang
 */
package com.jade.framework.security.shiro.authc;

import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.credential.CredentialsMatcher;

/**
 * sessionId认证器
 *
 * @author <a href="mailto:lyyang@jade.com">lyyang</a>
 * @version 1.0 15-1-17 下午3:07
 */
public class SessionIdMatcher
        implements CredentialsMatcher
{
    //只要能够根据sessionid取得用户session,就表示验证通过
    public boolean doCredentialsMatch(AuthenticationToken authenticationToken, AuthenticationInfo authenticationInfo)
    {
        return authenticationInfo != null;
    }
}
